package com.pccw.client.hessianclient;

import java.net.URLConnection;
import java.util.List;

public class MyHessianUtil {
	
    public static String proessSetCookie(URLConnection conn){
    	List<String> cookies=conn.getHeaderFields().get("Set-Cookie");
    	String session=null;
    	if(cookies!=null && cookies.size()>0 && (session=cookies.get(0))!=null){
    		return session.substring(0, session.indexOf(';'));
    	}
    	return null;
    }
}
